﻿using System.Collections.Generic;

namespace SpiderStudy.WebSite.Douban
{
    internal class DoubanStaticValue
    {
        /// <summary>
        /// 评论API
        /// </summary>
        private string CommentAPI = "https://movie.douban.com/subject/{0}/comments?start=0&limit=20&sort=new_score&status=P&percent_type=h";

        /// <summary>
        /// 只获取第一个结果，关键词需要ENCODE转码
        /// </summary>
        private string SearchApi = "https://api.douban.com/v2/movie/search?q={0}&count=1";

        /// <summary>
        /// 获取视频信息
        /// </summary>
        private string MovieInfoAPI = "https://api.douban.com/v2/movie/subject/{0}";

        /// <summary>
        /// 评论API
        /// </summary>
        public string CommentAPI1 { get => CommentAPI; set => CommentAPI = value; }

        /// <summary>
        /// 搜索API
        /// </summary>
        public string SearchApi1 { get => SearchApi; set => SearchApi = value; }

        /// <summary>
        /// 电影信息API
        /// </summary>
        public string MovieInfoAPI1 { get => MovieInfoAPI; set => MovieInfoAPI = value; }
    }

    public class SearchInfo
    {
        public class Rating
        {
            /// <summary>
            ///
            /// </summary>
            public int max { get; set; }

            /// <summary>
            ///
            /// </summary>
            public double average { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string stars { get; set; }

            /// <summary>
            ///
            /// </summary>
            public int min { get; set; }
        }

        public class Avatars
        {
            /// <summary>
            ///
            /// </summary>
            public string small { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string large { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string medium { get; set; }
        }

        public class CastsItem
        {
            /// <summary>
            ///
            /// </summary>
            public string alt { get; set; }

            /// <summary>
            ///
            /// </summary>
            public Avatars avatars { get; set; }

            /// <summary>
            /// 高田忧希
            /// </summary>
            public string name { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string id { get; set; }
        }

        public class DirectorsItem
        {
            /// <summary>
            ///
            /// </summary>
            public string alt { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string avatars { get; set; }

            /// <summary>
            /// 河村智之
            /// </summary>
            public string name { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string id { get; set; }
        }

        public class Images
        {
            /// <summary>
            ///
            /// </summary>
            public string small { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string large { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string medium { get; set; }
        }

        public class SubjectsItem
        {
            /// <summary>
            ///
            /// </summary>
            public Rating rating { get; set; }

            /// <summary>
            ///
            /// </summary>
            public List<string> genres { get; set; }

            /// <summary>
            /// 三颗星彩色冒险
            /// </summary>
            public string title { get; set; }

            /// <summary>
            ///
            /// </summary>
            public List<CastsItem> casts { get; set; }

            /// <summary>
            ///
            /// </summary>
            public int collect_count { get; set; }

            /// <summary>
            /// 三ツ星カラーズ
            /// </summary>
            public string original_title { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string subtype { get; set; }

            /// <summary>
            ///
            /// </summary>
      //      public List<DirectorsItem> directors { get; set; }
            /// <summary>
            ///
            /// </summary>
            public string year { get; set; }

            /// <summary>
            ///
            /// </summary>
            public Images images { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string alt { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string id { get; set; }
        }

        public class Root
        {
            /// <summary>
            ///
            /// </summary>
            public int count { get; set; }

            /// <summary>
            ///
            /// </summary>
            public int start { get; set; }

            /// <summary>
            ///
            /// </summary>
            public int total { get; set; }

            /// <summary>
            ///
            /// </summary>
            public List<SubjectsItem> subjects { get; set; }

            /// <summary>
            /// 搜索 "三颗星彩色冒险" 的结果
            /// </summary>
            public string title { get; set; }
        }
    }

    public class ArticleInfo
    {
        public class Rating
        {
            /// <summary>
            /// 最高评分
            /// </summary>
            public int max { get; set; }

            /// <summary>
            /// 平均
            /// </summary>
            public double average { get; set; }

            /// <summary>
            /// 星星
            /// </summary>
            public string stars { get; set; }

            /// <summary>
            /// 最低
            /// </summary>
            public int min { get; set; }
        }

        /// <summary>
        /// 三种尺寸剧照大小
        /// </summary>
        public class Images
        {
            /// <summary>
            /// 剧照大小
            /// </summary>
            public string small { get; set; }

            /// <summary>
            /// 剧照大小
            /// </summary>
            public string large { get; set; }

            /// <summary>
            /// 剧照大小
            /// </summary>
            public string medium { get; set; }
        }

        /// <summary>
        /// 三种尺寸头像
        /// </summary>
        public class Avatars
        {
            /// <summary>
            /// 头像大小
            /// </summary>
            public string small { get; set; }

            /// <summary>
            /// 头像大小
            /// </summary>
            public string large { get; set; }

            /// <summary>
            /// 头像大小
            /// </summary>
            public string medium { get; set; }
        }

        public class CastsItem
        {
            /// <summary>
            /// 人物介绍页面
            /// </summary>
            public string alt { get; set; }

            /// <summary>
            /// 三种大小的头像
            /// </summary>
            public Avatars avatars { get; set; }

            /// <summary>
            /// 人物介绍 人物名
            /// </summary>
            public string name { get; set; }

            /// <summary>
            /// 人物信息页面ID
            /// </summary>
            public string id { get; set; }
        }

        /// <summary>
        /// 制作人
        /// </summary>
        public class DirectorsItem
        {
            /// <summary>
            /// 制作人标签
            /// </summary>
            public string alt { get; set; }

            /// <summary>
            /// 制作人头像
            /// </summary>
            public Avatars avatars { get; set; }

            /// <summary>
            /// 制作人名字
            /// </summary>
            public string name { get; set; }

            /// <summary>
            /// 制作人ID
            /// </summary>
            public string id { get; set; }
        }

        public class Root
        {
            /// <summary>
            /// 评分
            /// </summary>
            public Rating rating { get; set; }

            /// <summary>
            /// 多少人看过（用户自评）
            /// </summary>
            public int reviews_count { get; set; }

            /// <summary>
            ///
            /// </summary>
            public int wish_count { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string douban_site { get; set; }

            /// <summary>
            /// 几几年发布
            /// </summary>
            public string year { get; set; }

            /// <summary>
            ///
            /// </summary>
            public Images images { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string alt { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string id { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string mobile_url { get; set; }

            /// <summary>
            /// 刀剑神域
            /// </summary>
            public string title { get; set; }

            /// <summary>
            ///
            /// </summary>
         //   public int do_count { get; set; }
            /// <summary>
            ///
            /// </summary>
            public string share_url { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string seasons_count { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string schedule_url { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string episodes_count { get; set; }

            /// <summary>
            ///
            /// </summary>
            public List<string> countries { get; set; }

            /// <summary>
            ///
            /// </summary>
            public List<string> genres { get; set; }

            /// <summary>
            ///
            /// </summary>
            public int collect_count { get; set; }

            /// <summary>
            ///
            /// </summary>
            public List<CastsItem> casts { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string current_season { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string original_title { get; set; }

            /// <summary>
            /// 简介
            /// </summary>
            public string summary { get; set; }

            /// <summary>
            ///
            /// </summary>
            public string subtype { get; set; }

            /// <summary>
            ///
            /// </summary>
            public List<DirectorsItem> directors { get; set; }

            /// <summary>
            ///
            /// </summary>
            public int comments_count { get; set; }

            /// <summary>
            ///
            /// </summary>
            public int ratings_count { get; set; }

            /// <summary>
            ///
            /// </summary>
            public List<string> aka { get; set; }
        }
    }
}